﻿using System.ComponentModel.DataAnnotations;

namespace Md.Api.Model.Manage.SysUser.Request;
/// <summary>
/// 分页获取系统用户列表请求实体
/// </summary>
public class RequestGetSysUserPageListModel : RequestBaseModel
{
    /// <summary>
    /// 部门编号
    /// </summary>
    public long DeptId { get; set; }
    /// <summary>
    /// 用户账号
    /// </summary>
    public string? UserName { get; set; }
    /// <summary>
    /// 用户昵称
    /// </summary>
    public string? NickName { get; set; }
    /// <summary>
    /// 用户类型（00系统用户）
    /// </summary>
    [StringLength(2, ErrorMessage = "用户类型长度为2")]
    public string? UserType { get; set; }
    /// <summary>
    /// 用户邮箱
    /// </summary>
    public string? Email { get; set; }
    /// <summary>
    /// 手机号码
    /// </summary>
    public string? Phonenumber { get; set; }
    /// <summary>
    /// 用户性别（0男 1女 2未知）
    /// </summary>
    [StringLength(1, ErrorMessage = "用户性别长度为1")]
    public string? Sex { get; set; }
    /// <summary>
    /// 帐号状态（0正常 1停用）
    /// </summary>
    [StringLength(1, ErrorMessage = "账号状态长度为1")]
    public string? Status { get; set; }
    /// <summary>
    /// 创建者
    /// </summary>
    public string? CreateBy { get; set; }
    /// <summary>
    /// 更新者
    /// </summary>
    public string? UpdateBy { get; set; }
    /// <summary>
    /// 开始时间
    /// </summary>
    public DateTime? BeginDate { get; set; }
    /// <summary>
    /// 结束时间
    /// </summary>
    public DateTime? EndDate { get; set; }
    /// <summary>
    /// 排序字段
    /// </summary>
    public string OrderBy { get; set; } = string.Empty;
    /// <summary>
    /// 是否倒序
    /// </summary>
    public bool IsDesc { get; set; }
    /// <summary>
    /// 当前页
    /// </summary>
    [Required(ErrorMessage ="当前页数不能为空")]
    public int PageIndex { get; set; }
    /// <summary>
    /// 每页条数
    /// </summary>
    [Required(ErrorMessage = "每页条数不能为空")]
    public int PageSize { get; set; }
}

